import {defineStore} from "pinia";
import axios from "@/axios"
import type {TShopList} from "@/types";
import {type Ref, ref} from "vue";
import useGetData from "@/hooks/useGetData";

export const useShopList = defineStore('data', () => {
    const {getData} = useGetData();
    const DataList: Ref<TShopList> = ref([])
    getData().then((res) => {
        DataList.value = res.value
    })


    return {DataList}
})